<template>
    <p>子组件</p>
    <p>foo:{{ foo }}</p>
    <p>age:{{ age }}</p>
</template>

<script setup>

// const props = defineProps(['foo','age'])
const props = defineProps({
    foo: String,
    age: Number
})



console.log(props.foo);
console.log(props.age);
</script>